package cn.e4j.config.properties;

import cn.e4j.core.util.SpringContextHolder;

/**
 * 全局获取配置工具类
 * Created by yuan_rz on 2019-05-17.
 */
public class PropertieUtils {

    private static E4jProperties e4jProperties;

    public static E4jProperties getE4jProperties(){
        if(e4jProperties == null){
            try{
                e4jProperties = SpringContextHolder.getBean(E4jProperties.class);
            }catch (Exception e){
                e.printStackTrace();
            }
        }
        return e4jProperties;
    }
}
